package com.da.lon.wang.xlg.model;

import android.app.Activity;
import android.content.Context;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.view.View;
import android.widget.LinearLayout;

import com.da.lon.wang.xlg.R;

public class HomeModel4 extends LinearLayout {

    private int mScreenWidth;

    public HomeModel4(Context context) {
        super(context);
        initView(context);
    }

    public HomeModel4(Context context, AttributeSet attrs) {
        super(context, attrs);
        initView(context);
    }

    public HomeModel4(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        initView(context);
    }

    private void initView(Context context) {
        DisplayMetrics dm = new DisplayMetrics();
        ((Activity) context).getWindowManager().getDefaultDisplay()
                .getMetrics(dm);
        mScreenWidth = dm.widthPixels;
        View view = inflate(context, R.layout.ocoffee_home_model4, this);
    }

}
